package com.elite.service;

import com.elite.dao.SellerMapper;
import com.elite.entity.Seller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by 李帅 on 2017/1/13.
 */
@Service("SellerService")
public class SellerServiceImp implements SellerService {

    @Autowired
     SellerMapper sellerMapper;


    /**
     * 增加一个卖家
     * @param seller
     * @return
     */
    @Override
    public void addSeller(Seller seller) {
         sellerMapper.insert(seller);
    }

    @Override
    public Seller findByIdCard(String sellerIdcare)  {
        return sellerMapper.selectByIdCard(sellerIdcare);
    }

    @Override
    public Seller findByUserId(Integer userId) {
        return sellerMapper.selectByUser(userId);
    }

    @Override
    public Seller selectByPrimaryKey(Integer sellerId) {
        return sellerMapper.selectByPrimaryKey(sellerId);
    }


}
